.class public Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;
.super Lcom/estrongs/android/pop/esclasses/ESPreferenceFragment;
.source "AppPreferenceFragment.java"


# instance fields
.field private a:Lcom/estrongs/android/pop/l;

.field private b:Landroidx/preference/EditTextPreference;

.field private c:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/pop/esclasses/ESPreferenceFragment;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->c:Ljava/lang/String;

    return-void
.end method

.method private b()V
    .locals 3

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->c:Ljava/lang/String;

    if-eqz v0, :cond_3

    invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v0

    const-string v1, ""

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    goto :goto_1

    .line 3
    :cond_0
    new-instance v0, Ljava/io/File;

    iget-object v1, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->c:Ljava/lang/String;

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 4
    invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 5
    iget-object v0, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->b:Landroidx/preference/EditTextPreference;

    if-eqz v0, :cond_1

    .line 6
    iget-object v1, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroidx/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 7
    iget-object v0, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->b:Landroidx/preference/EditTextPreference;

    iget-object v1, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroidx/preference/EditTextPreference;->setText(Ljava/lang/String;)V

    .line 8
    :cond_1
    iget-object v0, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->a:Lcom/estrongs/android/pop/l;

    iget-object v1, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->c:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/estrongs/android/pop/l;->L(Ljava/lang/String;)V

    goto :goto_0

    .line 9
    :cond_2
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    const v1, 0x7f11077f

    const/4 v2, 0x1

    invoke-static {v0, v1, v2}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    :goto_0
    return-void

    :cond_3
    :goto_1
    const-string v0, "/sdcard/"

    .line 10
    iput-object v0, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->c:Ljava/lang/String;

    return-void
.end method

.method static synthetic b(Landroid/content/DialogInterface;I)V
    .locals 0

    .line 1
    invoke-interface {p0}, Landroid/content/DialogInterface;->dismiss()V

    return-void
.end method

.method private d()V
    .locals 2

    .line 1
    sget-boolean v0, Lcom/estrongs/android/pop/j;->B:Z

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;

    move-result-object v0

    const-string v1, "app_root_enhancement"

    invoke-virtual {p0, v0, v1}, Lcom/estrongs/android/pop/esclasses/ESPreferenceFragment;->a(Landroidx/preference/PreferenceGroup;Ljava/lang/String;)V

    goto :goto_0

    .line 3
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->a:Lcom/estrongs/android/pop/l;

    invoke-virtual {v0}, Lcom/estrongs/android/pop/l;->u1()Z

    move-result v0

    if-nez v0, :cond_1

    const-string v0, "backup_app_cache"

    .line 4
    invoke-virtual {p0, v0}, Landroidx/preference/PreferenceFragmentCompat;->findPreference(Ljava/lang/CharSequence;)Landroidx/preference/Preference;

    move-result-object v0

    const/4 v1, 0x0

    .line 5
    invoke-virtual {v0, v1}, Landroidx/preference/Preference;->setEnabled(Z)V

    const-string v0, "root_auto_install"

    .line 6
    invoke-virtual {p0, v0}, Landroidx/preference/PreferenceFragmentCompat;->findPreference(Ljava/lang/CharSequence;)Landroidx/preference/Preference;

    move-result-object v0

    .line 7
    invoke-virtual {v0, v1}, Landroidx/preference/Preference;->setEnabled(Z)V

    .line 8
    :cond_1
    :goto_0
    iget-object v0, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->a:Lcom/estrongs/android/pop/l;

    invoke-virtual {v0}, Lcom/estrongs/android/pop/l;->p()Ljava/lang/String;

    move-result-object v0

    const-string v1, "app_backup_dir"

    .line 9
    invoke-virtual {p0, v1}, Landroidx/preference/PreferenceFragmentCompat;->findPreference(Ljava/lang/CharSequence;)Landroidx/preference/Preference;

    move-result-object v1

    check-cast v1, Landroidx/preference/EditTextPreference;

    iput-object v1, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->b:Landroidx/preference/EditTextPreference;

    .line 10
    invoke-virtual {v1, v0}, Landroidx/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 11
    iget-object v1, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->b:Landroidx/preference/EditTextPreference;

    invoke-virtual {v1, v0}, Landroidx/preference/EditTextPreference;->setText(Ljava/lang/String;)V

    .line 12
    iget-object v0, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->b:Landroidx/preference/EditTextPreference;

    new-instance v1, Lcom/estrongs/android/ui/preference/fragments/h;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/preference/fragments/h;-><init>(Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;)V

    invoke-virtual {v0, v1}, Landroidx/preference/Preference;->setOnPreferenceChangeListener(Landroidx/preference/Preference$OnPreferenceChangeListener;)V

    .line 13
    invoke-static {}, Lcom/estrongs/android/pop/utils/q;->b()Z

    move-result v0

    if-nez v0, :cond_2

    .line 14
    invoke-virtual {p0}, Landroidx/preference/PreferenceFragmentCompat;->getPreferenceScreen()Landroidx/preference/PreferenceScreen;

    move-result-object v0

    const-string v1, "app_check_update"

    invoke-virtual {p0, v0, v1}, Lcom/estrongs/android/pop/esclasses/ESPreferenceFragment;->a(Landroidx/preference/PreferenceGroup;Ljava/lang/String;)V

    goto :goto_1

    :cond_2
    const-string v0, "auto_check_list"

    .line 15
    invoke-virtual {p0, v0}, Landroidx/preference/PreferenceFragmentCompat;->findPreference(Ljava/lang/CharSequence;)Landroidx/preference/Preference;

    move-result-object v0

    .line 16
    new-instance v1, Lcom/estrongs/android/ui/preference/fragments/j;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/preference/fragments/j;-><init>(Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;)V

    invoke-virtual {v0, v1}, Landroidx/preference/Preference;->setOnPreferenceClickListener(Landroidx/preference/Preference$OnPreferenceClickListener;)V

    :goto_1
    return-void
.end method

.method private f()V
    .locals 3

    .line 1
    new-instance v0, Lcom/estrongs/android/ui/dialog/q$n;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;-><init>(Landroid/content/Context;)V

    const v1, 0x7f110660

    .line 2
    invoke-virtual {v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;->b(I)Lcom/estrongs/android/ui/dialog/q$n;

    const v1, 0x7f110780

    .line 3
    invoke-virtual {v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;->a(I)Lcom/estrongs/android/ui/dialog/q$n;

    new-instance v1, Lcom/estrongs/android/ui/preference/fragments/i;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/preference/fragments/i;-><init>(Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;)V

    const v2, 0x7f1102a2

    .line 4
    invoke-virtual {v0, v2, v1}, Lcom/estrongs/android/ui/dialog/q$n;->b(ILandroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    sget-object v1, Lcom/estrongs/android/ui/preference/fragments/g;->a:Lcom/estrongs/android/ui/preference/fragments/g;

    const v2, 0x7f11029d

    .line 5
    invoke-virtual {v0, v2, v1}, Lcom/estrongs/android/ui/dialog/q$n;->a(ILandroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    .line 6
    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q$n;->c()Lcom/estrongs/android/ui/dialog/q;

    return-void
.end method


# virtual methods
.method public synthetic a(Landroid/content/DialogInterface;I)V
    .locals 0

    .line 14
    invoke-direct {p0}, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->b()V

    .line 15
    invoke-interface {p1}, Landroid/content/DialogInterface;->dismiss()V

    return-void
.end method

.method public synthetic a(Landroidx/preference/Preference;)Z
    .locals 2

    .line 12
    new-instance p1, Landroid/content/Intent;

    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    const-class v1, Lcom/estrongs/android/pop/app/AppCheckUpdateList;

    invoke-direct {p1, v0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 13
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireActivity()Landroidx/fragment/app/FragmentActivity;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V

    const/4 p1, 0x1

    return p1
.end method

.method public synthetic a(Landroidx/preference/Preference;Ljava/lang/Object;)Z
    .locals 4

    .line 1
    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p1

    .line 2
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object p2

    const-string v0, ""

    invoke-virtual {p2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p2

    const/4 v0, 0x0

    if-eqz p2, :cond_0

    .line 3
    invoke-direct {p0}, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->f()V

    return v0

    .line 4
    :cond_0
    invoke-static {p1}, Lcom/estrongs/fs/impl/local/f;->i(Ljava/lang/String;)Z

    move-result p2

    const/4 v1, 0x1

    if-eqz p2, :cond_1

    invoke-static {p1}, Lcom/estrongs/fs/impl/local/f;->c(Ljava/lang/String;)Z

    move-result p2

    if-eqz p2, :cond_1

    const/4 p2, 0x1

    goto :goto_0

    :cond_1
    const/4 p2, 0x0

    .line 5
    :goto_0
    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v2

    sub-int/2addr v2, v1

    invoke-virtual {p1, v2}, Ljava/lang/String;->charAt(I)C

    move-result v2

    const/16 v3, 0x2f

    if-eq v2, v3, :cond_2

    .line 6
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, "/"

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    .line 7
    :cond_2
    iput-object p1, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->c:Ljava/lang/String;

    if-eqz p2, :cond_3

    .line 8
    iget-object p2, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->b:Landroidx/preference/EditTextPreference;

    invoke-virtual {p2, p1}, Landroidx/preference/Preference;->setSummary(Ljava/lang/CharSequence;)V

    .line 9
    iget-object p2, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->b:Landroidx/preference/EditTextPreference;

    invoke-virtual {p2, p1}, Landroidx/preference/EditTextPreference;->setText(Ljava/lang/String;)V

    .line 10
    iget-object p2, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->a:Lcom/estrongs/android/pop/l;

    invoke-virtual {p2, p1}, Lcom/estrongs/android/pop/l;->L(Ljava/lang/String;)V

    return v1

    .line 11
    :cond_3
    invoke-direct {p0}, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->f()V

    return v0
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 0

    .line 1
    invoke-super {p0, p1}, Landroidx/preference/PreferenceFragmentCompat;->onCreate(Landroid/os/Bundle;)V

    .line 2
    invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/android/ui/preference/TabletSettingsActivity;->b(Landroid/content/Context;)Z

    move-result p1

    if-eqz p1, :cond_0

    const p1, 0x7f14001f

    .line 3
    invoke-virtual {p0, p1}, Lcom/estrongs/android/pop/esclasses/ESPreferenceFragment;->addPreferencesFromResource(I)V

    goto :goto_0

    :cond_0
    const p1, 0x7f140011

    .line 4
    invoke-virtual {p0, p1}, Lcom/estrongs/android/pop/esclasses/ESPreferenceFragment;->addPreferencesFromResource(I)V

    .line 5
    :goto_0
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->a:Lcom/estrongs/android/pop/l;

    .line 6
    invoke-direct {p0}, Lcom/estrongs/android/ui/preference/fragments/AppPreferenceFragment;->d()V

    return-void
.end method
